﻿using System;

public partial class aspx_teacher_default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string dengji = ddl等级.SelectedItem.Text;

        if (dengji == "全部")
        {
            dengji = "%";
        }
        if (ddl校内.SelectedItem.Text == "全部")
        {
            using (ds_名师讲堂TableAdapters.tb_名师风采TableAdapter da = new ds_名师讲堂TableAdapters.tb_名师风采TableAdapter())
            {
                this.rpt_teacher.DataSource = da.GetDataBy名师等级(dengji);
            }
        }
        else
        {
            using (ds_名师讲堂TableAdapters.tb_名师风采TableAdapter da = new ds_名师讲堂TableAdapters.tb_名师风采TableAdapter())
            {
                this.rpt_teacher.DataSource = da.GetDataBy校内等级(Convert.ToBoolean(ddl校内.SelectedValue), dengji);
            }
        }
        this.rpt_teacher.DataBind();

    }
}